Skip to content

gh-128013: Convert unicodeobject.c macros to functions#128061

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:unicode_static_inline
Dec 18, 2024
Merged

gh-128013: Convert unicodeobject.c macros to functions#128061
vstinner merged 2 commits into
python:mainfrom
vstinner:unicode_static_inline

Conversation

@vstinner

@vstinner vstinner commented Dec 18, 2024

Copy link
Copy Markdown
Member

Convert unicodeobject.c macros to static inline functions.

  • Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros.
  • Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros.
  • Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.

Convert unicodeobject.c macros to static inline functions.

* Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros.
* Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros.
* Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.

@skirpichev skirpichev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a one nitpick.

Comment thread Objects/unicodeobject.c Outdated
@vstinner vstinner merged commit f802c8b into python:main Dec 18, 2024
@vstinner vstinner deleted the unicode_static_inline branch December 18, 2024 15:34
kumaraditya303 pushed a commit to kumaraditya303/cpython that referenced this pull request Jan 2, 2025
…128061)

Convert unicodeobject.c macros to static inline functions.

* Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros.
* Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros.
* Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
…128061)

Convert unicodeobject.c macros to static inline functions.

* Add _PyUnicode_SET_UTF8() and _PyUnicode_SET_UTF8_LENGTH() macros.
* Add PyUnicode_HASH() and PyUnicode_SET_HASH() macros.
* Remove unused _PyUnicode_KIND() and _PyUnicode_GET_LENGTH() macros.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants